<template>
	<view class="content">
		<view class="info-item" @click="navigate('/page_other/business_loan/new_bus_loan/intro?id='+item.id)" v-for="(item,index) in list">
			<!-- <image :src="item.src" class="bgx"></image> -->
			<view class="left">
				<view class="left-top">
					<image class="gwb" src="https://job-1306862033.cos.ap-chengdu.myqcloud.com/miniprogram-static/home/jq-erq/gwb.png" mode=""></image>
					<view class="title FZHZGBJ">{{ item.title }}</view>
				</view>
				<view class="txt">{{ item.abstracts }}</view>
			</view>
			
		</view>
	</view>
</template>

<script>
	import {
		getLoanInfoList
	} from '@/api/bussiness.js';
	import {
		addModuleCount
	} from '@/api/policy.js';
	export default {
		data() {
			return {
				page:1,
				limit:10,
				list:[{
					id:1,
					title:'创业担保贷款',
					abstracts:'帮助创业者解决融资困难',
				},
				{
					id:2,
					title:'陇原惠岗贷',
					abstracts:'针对省内吸纳就业多、稳岗效果好且用工规范的名单内各类企业投放的专属产品',
				},
				{
					id:3,
					title:'个人信用贷',
					abstracts:'以借款人的信誉发放的贷款， 借款人不需要提供担保',
				}],
			}
		},
		methods: {
			navigate(url) {
				uni.navigateTo({
					url
				})
			},
			getList() {
				uni.showLoading({
					title: '加载中',
					mask: true
				})
				getLoanInfoList({
					page: this.page,
					limit: this.limit,
				}).then(data => {
					uni.hideLoading()
					this.list = data.list
				}).catch(() => {
					uni.hideLoading()
				})
			},
			getAddModuleCount() {
				addModuleCount({
					type: 3,
				}).then(data => {
					uni.hideLoading()
					this.form = data
				}).catch(() => {
					uni.hideLoading()
				})
			},
		},
		onLoad() {
			this.getList()
			this.getAddModuleCount()
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		width: 100%;
		padding: 30rpx;
		.btn-block {
			position: fixed;
			right: 20rpx;
			bottom: 30rpx;
			z-index: 999;
			// width: 130rpx;
			// height: 130rpx;
			color: #333;
			font-size: 28rpx;
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
			background: #fff;
			border-radius: 20rpx;
			box-shadow: 0 0 18rpx 0 #dddddd;
		}
		.info-item:nth-child(6n+1){
			background: url('https://job-1306862033.cos.ap-chengdu.myqcloud.com/miniprogram-static/home/jq-erq/dk1.png') no-repeat center;
			background-size: 100% 100%;
		}
		.info-item:nth-child(6n+2){
			background: url('https://job-1306862033.cos.ap-chengdu.myqcloud.com/miniprogram-static/home/jq-erq/dk2.png') no-repeat center;
			background-size: 100% 100%;
		}
		.info-item:nth-child(6n+3){
			background: url('https://job-1306862033.cos.ap-chengdu.myqcloud.com/miniprogram-static/home/jq-erq/dk3.png') no-repeat center;
			background-size: 100% 100%;
		}
		.info-item:nth-child(6n+4){
			background: url('https://job-1306862033.cos.ap-chengdu.myqcloud.com/miniprogram-static/home/jq-erq/dk1.png') no-repeat center;
			background-size: 100% 100%;
		}
		.info-item:nth-child(6n+5){
			background: url('https://job-1306862033.cos.ap-chengdu.myqcloud.com/miniprogram-static/home/jq-erq/dk2.png') no-repeat center;
			background-size: 100% 100%;
		}
		.info-item:nth-child(6n+6){
			background: url('https://job-1306862033.cos.ap-chengdu.myqcloud.com/miniprogram-static/home/jq-erq/dk3.png') no-repeat center;
			background-size: 100% 100%;
		}
		.info-item {
			position: relative;
			height: 240rpx;
			padding: 30rpx 30rpx 30rpx 30rpx;
			display: flex;
			margin-bottom: 30rpx;
			
			.left{
				width: 100%;
				display: flex;
				flex-direction: column;
				justify-content: center;
				
				
				.left-top{
					display: flex;
					margin-bottom: 20rpx;
					height: 44rpx;
					.gwb{
						height: 44rpx;
						width: 44rpx;
						margin-right: 15rpx;
					}
				}
				
				.title {
					color: #fff;
					font-size: 36rpx;
					padding-top: 3rpx;
				}
				
				.txt {
					color: #fff;
					font-size: 24rpx;
					line-height: 44rpx;
					overflow: hidden;
					text-overflow: ellipsis;
					display: -webkit-box;
					-webkit-box-orient: vertical;
					-webkit-line-clamp: 2;
				}
			}
			.right{
				width: 20%;
				height: 100%;
				display: flex;
				align-items: center;
				.image{
					width: 120rpx;
					height: 120rpx;
				}
			}

			
		}

		.info-item1 {
			height: 240rpx;
			background: url('https://job-1306862033.cos.ap-chengdu.myqcloud.com/miniprogram-static/home/jq-erq/dai2.png') no-repeat center;
			background-size: 100% 100%;
			padding: 30rpx 30rpx 30rpx 30rpx;
			display: flex;
			margin-bottom: 30rpx;

			.left{
				width: 80%;
				display: flex;
				flex-direction: column;
				justify-content: center;
				
				.left-top{
					display: flex;
					margin-bottom: 20rpx;
					.gwb{
						height: 44rpx;
						width: 44rpx;
						margin-right: 15rpx;
					}
				}
				.title {
					color: #fff;
					font-size: 36rpx;
					padding-top: 3rpx;
				}
				
				.txt {
					color: #fff;
					font-size: 24rpx;
					line-height: 44rpx;
					padding-right: 50rpx;
				}
			}
			.right{
				width: 20%;
				height: 100%;
				display: flex;
				align-items: center;
				.image{
					width: 120rpx;
					height: 120rpx;
				}
			}
		}

		.info-item2 {
			height: 240rpx;
			background: url('https://job-1306862033.cos.ap-chengdu.myqcloud.com/miniprogram-static/home/jq-erq/dai3.png') no-repeat center;
			background-size: 100% 100%;
			padding: 30rpx 30rpx 30rpx 30rpx;
			display: flex;

			.left{
				width: 80%;
				display: flex;
				flex-direction: column;
				justify-content: center;
				
				.left-top{
					display: flex;
					margin-bottom: 20rpx;
					.gwb{
						height: 44rpx;
						width: 44rpx;
						margin-right: 15rpx;
					}
				}
				.title {
					color: #fff;
					font-size: 36rpx;
					padding-top: 3rpx;
				}
				
				.txt {
					color: #fff;
					font-size: 24rpx;
					line-height: 44rpx;
					padding-right: 50rpx;
				}
			}
			.right{
				width: 20%;
				height: 100%;
				display: flex;
				align-items: center;
				.image{
					width: 120rpx;
					height: 120rpx;
				}
			}
		}
	}
</style>